<?php
    $run='';
    if(isset($_POST['pd'])){
        $year=$_POST['year'];
        if(is_numeric($year)){
            if(($year % 4==0 and $year %100!=0) or $year %400==0){
                $run=$year.'是闰年';
            }
            else{
                $run=$year.'不是闰年';
            }
        }else{
            $run='你输了的不是一个数字';
        }
        

    }
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <form action="" method="post">
        <span><?php echo $run;?></span>
        请输入年份：<input type="text" name="year"><br/>
        <input type="submit" value="判断" name="pd">
        </form>
    </div>
</body>
</html>